In computing, data compression, source coding, or bit-rate reduction involves encoding information using fewer bits than the original representation. Compression reduces bits by identifying and eliminating statistical redundancy. The process of reducing the size of a data file is referred to as data compression. Compression is useful because it helps reduce resource usage, such as data storage space or transmission capacity.
Compression can be either lossy or lossless. Lossy compression (or irreversible compression) is the class of data encoding methods that uses inexact approximation and partial data discarding to represent the content. Lossless compression is a class of data compression algorithms that allows the original data to be perfectly reconstructed from the compressed data. By contrast, lossy compression permits reconstruction only of an approximation of the original data, though this usually improves compression rate (and therefore reduces file sizes.)